<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
    function fn() {

    }

    var fn_1 = function () {

    }
</script>
<script>
        ((age) => {
            console.log(age);
        })(18)
</script>
<script>
    var fn_1 = (name) => {
        console.log(name);
    }
    fn_1('ls')
</script>
<script>
    // 把function去掉，在小括号后面加上 =>
    var obj = {
        name: 'zs',
        age: 18,
        // say:function(){

        // }
        // say() {
        //     console.log(this);
        // }
        say: () => {
            // console.log(this);
        }
    }
    obj.say()
    var arr = [function () {
        console.log(this);
    }]
    arr[0]()
</script>
<script>
    let setInterval1 = setInterval(function () {

    }, 1000)
    console.log(setInterval1);
    let setInterval2 = setInterval(() => {
        console.log(this);
    }, 1000)
    console.log(setInterval2);
</script>
<script>
    let arr = [1, 2, 3]
    arr.map(function (item, index) {

    })
    arr.map((item, index) => {

    })
</script>

</html>